{#右边栏#}
<aside id="sidebar">
     <!--分类-->
  <div class="widget-wrap">
    <h3 class="widget-title">分类</h3>
    <div class="widget">
      <ul class="category-list">
{#            循环将类别进行展示#}
          {% for cate_post in cate_posts %}
            <li class="category-list-item">
{#            每个类别附带一个超链接,以便于按类别查询文章#}
              <a class="category-list-link" href="/index/?category={{ cate_post.category__cname }}">{{ cate_post.category__cname }}&nbsp;({{ cate_post.count }})</a>
{#              <span class="category-list-count">{{ cate_post.count }}</span>#}
            </li>
          {% endfor %}

      </ul>
      </div>
  </div>

     <!--归档-->
  <div class="widget-wrap">
    <h3 class="widget-title">归档</h3>
    <div class="widget">
      <ul class="archive-list">
{#      将创建时间循环展示#}
      {% if created %}

            {% for ap in created %}
            <li class="archive-list-item">
            {#            每个创建时间附带一个超链接,以便于按创建时间查询文章#}
                <a class="archive-list-link" href="/index/?created={{ ap.created | date:"Y-m-j" }}">{{ ap.created }}&nbsp;({{ ap.count }})</a>

            </li>
          {% endfor %}
          {% else %}
            {% for ap in arc_posts %}
            <li class="archive-list-item">
            {#            每个创建时间附带一个超链接,以便于按创建时间查询文章#}
                {{ ap.0|date:'Y年m月' }}
                <span class="archive-list-count">{{ ap.1 }}</span>
            </li>
          {% endfor %}

      {% endif %}
      </ul>
    </div>
  </div>

    <div class="widget-wrap">
    <h3 class="widget-title">友情链接</h3>
    <div class="widget">
      <ul>
          <li>
            <a href="http://www.bjsxt.com/" target="_blank">尚学堂</a>
          </li>
          <li>
            <a href="http://www.sxt.cn/" target="_blank">速学堂</a>
          </li>
      </ul>
    </div>
    </div>

  <div class="widget-wrap">
    <h3 class="widget-title">近期文章&nbsp;(10)</h3>
    <div class="widget">
      <ul>
      {#      将文章标题循环展示#}
            {% for rp in recent_posts %}
                <li>
{#            每个文章标题附带一个超链接,以便于查看对应的文章#}
                    <a href="/post/?id={{ rp.id }}" target="_blank">{{ rp.title }}&emsp;<span style="font-size: 10px">{{ rp.created }}</span></a>
                </li>
            {% endfor %}
      </ul>
    </div>
  </div>

</aside>